import { createRouter, createWebHistory } from 'vue-router'
import home from '@/views/home/home.vue'
import My from '@/views/home/my.vue'
import Shop from '@/views/home/shop.vue'
import Cla from '@/views/home/cla.vue'
import Index from '@/views/home/index.vue'
import Xq from '@/views/xq.vue'
import Js from '@/views/js.vue'
import Zf from '@/views/zf.vue'
import Jg from '@/views/jg.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      component: home, children: [
        {
          path: 'index',
          component: Index,
        },
        {
          path: 'cla',
          component: Cla,
        },
        {
          path: 'shop',
          component: Shop,
        },
        {
          path: 'my',
          component: My,
        },
      ]
    },
    {
      path: '/xq',
      component: Xq,
    },
    {
      path: '/js',
      component: Js,
    },
    {
      path: '/zf',
      component: Zf,
    },
        {
      path: '/jg',
      component: Jg,
    },
  ],
})

export default router
